home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Network CD 1
/
Network CD.iso
/
amospd
/
491-500
/
apd500
/
karl_roberts
/
freaky-sinus-scroll.amos
/
freaky-sinus-scroll.amosSourceCode
< prev
next >
Wrap
AMOS Source Code
|
1986-08-03
|
3KB
|
82 lines
'*****************************************
'*
'* INNOVATIONS - ICKY
'*
'* ANOTHER 10 MINUTE ROUTINE
'*
'* Four scrolls each slightly more mutated than the other!
'*
'* Its quite slow, simply because its AMOS, and its
'* not a very clever way of doing it.There is a quick method of
'* rotating bit masks, but thats getting too much into assembler!
'*
TEX
Procedure TEX
Screen Open 0,368,200,2,Lowres
Curs Off : Flash Off : Cls 0
Screen Display 0,,24,,
Palette $6
Colour 1,$FF0
'* no need to double buffer, blame it on the speed of the routine
'* oh shockwave, please note, Wait VBL, is too slow
'* Write your own timing routine
'* its much damn faster, how do you think I got the realtime bubble
'* starfield to run in 50 frames, with realtime rotation, certainly
'* not with a wait VBL, thats a cert!
'*
Autoback 0
TEX$=" NOW THIS IS MORE LIKE IT. AFTER A FEW CALCULATIONS ITS FINALLY COMPLETE"
TEX$=TEX$+". IT COULD BE BETTER BUT THE ROUTINES OKAY. WHY BOTHER "
TEX$=TEX$+" WHEN ITS ONLY A DEMO............................"
TEX$=TEX$+" THIS SCROLL IS NOT TRUE SINUS ONLY AN EMULATION"
TEX$=TEX$+" BUT STILL ITS GET THE MESSAGE ACROSS. I SUPPOSE."
TEX$=TEX$+" NO GREETS IN THIS ROUTINE....I AM TOO LAZY TO DO THEM......"
PNR=1 : CNT=1
' Pixel_jump = step size in copy blocks screen is scanned
' Ripple = smoothness of effect try 70,71 for best results
PIXEL_JUMP=20 : RIPPLE=70
Extension_5_003A
' kill multi-tasking
Dreg(0)=Execall(-132)
Repeat
Inc CNT : If CNT>18 Then Gosub NEWLET
For H=340 To 0 Step -PIXEL_JUMP
'********************************************************
Screen Copy 0,H,10,H+10,149 To 0,H-1,59
Screen Copy 0,H+10,20,H+20,149 To 0,H+9,RIPPLE
'*******************************************************
' pixel_jump must equal -40
' include these lines for a faster, but rougher scroll
' dont forget take other screen copies out in this repeat loop
' Screen Copy 0,H,10,H+20,149 To 0,H-1,59
' Screen Copy 0,H+10,20,H+40,149 To 0,H+9,RIPPLE
'*******************************************************
Next H
Screen Copy 0,0,10,360,80 To 0,-1,10 : Wait 1
Until Fire(0)
' reactivate multitasking
Dreg(0)=Execall(-138)
Edit
POS=245
For T=4 To 0 Step -1
For Y=POS To 310 Step 10
Screen Display T,,Y,, : Wait Vbl
Next Y
Add POS,-55
Screen Close T
Next T
Rainbow Del 2
Screen 7 : Fade 3 : Wait 40 : Screen Close 7
Pop Proc
NEWLET:
TX$=Mid$(TEX$,PNR,1)
T=Asc(TX$)-64
If TX$=" " Then T=40
If TX$="." Then T=27
If TX$="?" Then T=28
If TX$="," Then T=39
Paste Icon 340,31,T
Inc PNR : If PNR>Len(TEX$) Then PNR=1
CNT=1
Return
End Proc